package com.zz.utils;

/**
 * @Author zhangbin
 * @Create 2023-02-21 13:46
 * @Description
 */
public class ContractUtil {

    public static String getContractName(String contractName){
        // 文件不支持的符号
        if(contractName.contains(":")){
            contractName = contractName.replaceAll(":","");
        }
        if(contractName.contains(" ")){
            contractName = contractName.replaceAll(" ","");
        }
        if(contractName.contains("\\")){
            contractName = contractName.replaceAll("\\\\","");
        }
        if(contractName.contains("/")){
            contractName = contractName.replaceAll("/","");
        }
        if(contractName.contains("（")){
            contractName = contractName.replaceAll("（","(");
        }
        if(contractName.contains("*")){
            contractName = contractName.replaceAll("\\*","-");
        }
        if(contractName.contains("+")){
            contractName = contractName.replaceAll("\\+","-");
        }
        return contractName;
    }
}
